Aliasing contracts: a dynamic approach to alias protection

نویسندگان

  • Janina Voigt
  • Alan Mycroft
چکیده

Object-oriented programming languages allow multiple variables to refer to the same object, a situation known as aliasing. Aliasing is a powerful tool which enables sharing of objects across a system. However, it can cause serious encapsulation breaches if not controlled properly; through aliasing, internal parts of aggregate objects can be exposed and potentially modified by any part of the system. A number of schemes for controlling aliasing have been proposed, including Clarke et al.’s ownership types and Boyland et al.’s capabilities. However, many existing systems lack flexibility and expressiveness, making it difficult in practice to program common idioms or patterns which rely on sharing, such as iterators. We introduce aliasing contracts, a dynamic alias protection scheme which is highly flexible and expressive. Aliasing contracts allow developers to express assumptions about which parts of a system can access particular objects. Aliasing contracts attempt to be a universal approach to alias protection; they can be used to encode various existing schemes.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Access contracts: a dynamic approach to object-oriented access protection

In object-oriented (OO) programming, variables do not contain objects directly but ad-dresses of objects on the heap. Thus, several variables can point to the same object; wecall this aliasing.Aliasing is a central feature of OO programming that enables efficient sharing of objectsacross a system. This is essential for the implementation of many programming idioms,such as it...

متن کامل

Dynamic Alias Protection with Aliasing Contracts

Object-oriented languages allow any object to point to any other object, limited only by type. The resultant possible aliasing makes programs hard to verify and maintain. Much research has been done on alias protection schemes to restrict aliasing. However, existing schemes are either informal (design-patternlike) or static type-like systems. The former are hard to verify, while the latter tend...

متن کامل

Flexible Alias Protection

Aliasing is endemic in object oriented programming. Because an object can be modified via any alias, object oriented programs are hard to understand, maintain, and analyse. Flexible alias protection is a conceptual model of inter-object relationships which limits the visibility of changes via aliases, allowing objects to be aliased but mitigating the undesirable effects of aliasing. Flexible al...

متن کامل

Constraints and Aliasing Protection in ConstrainedJava

Constraint systems and alias protection schemes have been around for the last ten or fifteen years, but due to their reliance on run-time information, have never caught on in the static programming mainstream. With dynamic languages experiencing a resurgence in popularity, these techniques may finally have a chance to gain greater exposure and become more popular.

متن کامل

Inferring Alias Contracts in VCC using Separation Analysis

The main goal of this work is to enable an interplay between two different verification tool chains: Frama-C, developed concomitantly by Commissariat à l’Énergie Atomique et aux Énergies Alternatives and Inria, and the Verified C Compiler, developed by Microsoft Research. Both tools have a long history and contain powerful algorithms for static verification of C source code. Both tools address ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2013